# encoding=utf-8

import sqlite3

con = sqlite3.connect('/Users/graceli/project/PythonTestProject/my02/数据表/demo.db')
print(con)

cur = con.cursor()
sql = '''create table t_person(
pno INTEGER primary key autoincrement,
pname VARCHAR not null,
age INTEGER 
)'''
try:
    cur.execute(sql)
    print('创建表成功')

except Exception as e:
    print(e)
    print('创建表失败')
finally:
    cur.close()
    con.close()